extends CanvasLayer

@onready var hp: Label = $HP
@onready var coin_num: Label = $CoinNum


func _ready() -> void:
	GlobalGameData.changed_hp.connect(on_change_hp)


func on_change_hp(amount: float) -> void:
	pass


func _process(_delta: float) -> void:
	hp.text = "HP: %s/%s" % [int(GlobalGameData.player_HP), int(GlobalGameData.PLAYER_MAX_HP)]
	coin_num.text = "Coin: %s" % GlobalGameData.player_coin
